package org.jef.core.mask;

import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;

/**
 * @program: jef-cloud
 * @description: 自定义注解拦截器
 * @author: Cheng Zhi
 * @create: 2024-10-02 19:53
 **/
public class EvalAnnotationIntrospector extends JacksonAnnotationIntrospector {

    @Override
    public Object findSerializer(Annotated a) {
        if(a.hasAnnotation(Eval.class)){
            return new EvalSerializer(a.getAnnotation(Eval.class));
        }
        return super.findSerializer(a);
    }
}
